package com.huixiaodian.cus_service.application;

import android.app.Application;

import com.umeng.commonsdk.UMConfigure;
import com.umeng.message.PushAgent;

import org.xutils.BuildConfig;
import org.xutils.x;

import javax.net.ssl.SSLSession;

public class HXDApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        initXUtils();
        initUMPush();
    }

    private void initXUtils(){
        x.Ext.init(this);
        x.Ext.setDebug(BuildConfig.DEBUG);
        x.Ext.setDefaultHostnameVerifier((String hostname, SSLSession session) -> true);
    }

    private void initUMPush(){
        UMConfigure.setLogEnabled(true);
        PushAgent.setup(this, "", "");
        UMConfigure.preInit(this, "", "");
    }
}
